package com.minstone.springmvcrestful.util;

import org.springframework.security.oauth2.client.filter.state.StateKeyGenerator;
import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails;
import org.springframework.security.oauth2.common.util.RandomValueStringGenerator;

/**
 * @author Dave Syer
 *
 */
public class DefaultStateKeyGenerator implements StateKeyGenerator {

	private RandomValueStringGenerator generator = new RandomValueStringGenerator();

	public String generateKey(OAuth2ProtectedResourceDetails resource) {
		return generator.generate();
	}
}